package com.example.shopping.service;

import com.example.shopping.dao.IBrandDao;
import com.example.shopping.pojo.Brand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/*
Create by 苍狼 于 2020/1/16
站在巅峰看世界，
落在深渊思人生。
*/
@Service
public class BrandServiceImpl implements BrandService {
    @Autowired(required = false)
    private IBrandDao brandDao;

    @Override
    public List<Brand> selectListBrand() {
        return brandDao.selectListBrand();
    }

    @Override
    public int insertBrand(Brand brand) {
        return brandDao.insertBrand(brand);
    }

    @Override
    public int updateBrand(Brand brand) {
        return brandDao.updateBrand(brand);
    }

    @Override
    public int deleteIdBrand(int id) {
        return brandDao.deleteIdBrand(id);
    }

    @Override
    public Brand selectByOne(int id) {
        return brandDao.selectByOne(id);
    }

    @Override
    public List<Brand> queryLikeBrand(Brand brand) {
        return brandDao.queryLikeBrand(brand);
    }
}
